<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台登录</title>
</head>
<body>
	后台登录：
	<s:form action="LoginOn">
    		<s:textfield name="admin.name" label="用户名"/>
     		<s:password name="admin.pwd" label="密码"/>
     		<s:textfield name="rand" size="5" label="验证码"/>
     		<img src="rand.action"   onclick="changeValidateCode(this)" title="点击图片刷新验证码"/>   
    		<s:submit/>
		</s:form>
		<s:fielderror fieldName="userError" theme="simple"/>
</body>
</html>

<script type="text/javascript"> 
function changeValidateCode(obj) { 
	var timenow = new Date().getTime(); 
	obj.src="rand.action?d="+timenow; 
} 
</script>